﻿using System.Collections.Generic;

namespace battlenet.wow.rt.domain.objects
{
    /// <summary>
    /// 
    /// </summary>
    public class ItemDetail
    {
        /// <summary>
        /// Gets or sets the identifier.
        /// </summary>
        /// <value>
        /// The identifier.
        /// </value>
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The name.
        /// </value>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the icon.
        /// </summary>
        /// <value>
        /// The icon.
        /// </value>
        public string Icon { get; set; }

        /// <summary>
        /// Gets the icon link.
        /// </summary>
        /// <value>
        /// The icon link.
        /// </value>
        public string IconLink { get { return Icon == null ? null : string.Format(ApplicationConstants.IconHost, Icon); } }

        /// <summary>
        /// Gets or sets the stackable.
        /// </summary>
        /// <value>
        /// The stackable.
        /// </value>
        public int Stackable { get; set; }

        /// <summary>
        /// Gets or sets the allowable classes.
        /// </summary>
        /// <value>
        /// The allowable classes.
        /// </value>
        public List<CharacterClass> AllowableClasses { get; set; }

        /// <summary>
        /// Gets or sets the item bind identifier.
        /// </summary>
        /// <value>
        /// The item bind identifier.
        /// </value>
        public int ItemBindId { get; set; } // TODO: add an enum once you know what the numbers stand for

        /// <summary>
        /// Gets or sets the bonus stats.
        /// </summary>
        /// <value>
        /// The bonus stats.
        /// </value>
        public List<Statistic> BonusStats { get; set; }

        /// <summary>
        /// Gets or sets the item spells.
        /// </summary>
        /// <value>
        /// The item spells.
        /// </value>
        public List<ItemSpell> ItemSpells { get; set; }

        /// <summary>
        /// Gets or sets the buy price.
        /// </summary>
        /// <value>
        /// The buy price.
        /// </value>
        public Price BuyPrice { get; set; }

        /// <summary>
        /// Gets or sets the item class identifier.
        /// </summary>
        /// <value>
        /// The item class identifier.
        /// </value>
        public int ItemClassId { get; set; } // TODO: add an enum once you know what the ids mean

        /// <summary>
        /// Gets or sets the item sub class identifier.
        /// </summary>
        /// <value>
        /// The item sub class identifier.
        /// </value>
        public int ItemSubClassId { get; set; } // TODO: add an enum once you know what the ids mean

        /// <summary>
        /// Gets or sets the container slots.
        /// </summary>
        /// <value>
        /// The container slots.
        /// </value>
        public int ContainerSlots { get; set; }

        /// <summary>
        /// Gets or sets the weapon information.
        /// </summary>
        /// <value>
        /// The weapon information.
        /// </value>
        public WeaponItem WeaponInfo { get; set; }

        /// <summary>
        /// Gets or sets the inventory type identifier.
        /// </summary>
        /// <value>
        /// The inventory type identifier.
        /// </value>
        public int InventoryTypeId { get; set; } // TODO: add an enum once you know what the ids mean

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="ItemDetail"/> is equippable.
        /// </summary>
        /// <value>
        ///   <c>true</c> if equippable; otherwise, <c>false</c>.
        /// </value>
        public bool Equippable { get; set; }

        /// <summary>
        /// Gets or sets the item level.
        /// </summary>
        /// <value>
        /// The item level.
        /// </value>
        public int ItemLevel { get; set; }

        /// <summary>
        /// Gets or sets the maximum count.
        /// </summary>
        /// <value>
        /// The maximum count.
        /// </value>
        public int MaxCount { get; set; }

        /// <summary>
        /// Gets or sets the maximum durability.
        /// </summary>
        /// <value>
        /// The maximum durability.
        /// </value>
        public int MaxDurability { get; set; }

        /// <summary>
        /// Gets or sets the minimum faction identifier.
        /// </summary>
        /// <value>
        /// The minimum faction identifier.
        /// </value>
        public int MinFactionId { get; set; } // TODO: add an enum once you know what this means

        /// <summary>
        /// Gets or sets the minimum reputation.
        /// </summary>
        /// <value>
        /// The minimum reputation.
        /// </value>
        public int MinReputation { get; set; }

        /// <summary>
        /// Gets or sets the quality.
        /// </summary>
        /// <value>
        /// The quality.
        /// </value>
        public int QualityId { get; set; }

        /// <summary>
        /// Gets the quality.
        /// </summary>
        /// <value>
        /// The quality.
        /// </value>
        public ItemQualityType Quality { get { return (ItemQualityType) QualityId; } }

        /// <summary>
        /// Gets or sets the sell price.
        /// </summary>
        /// <value>
        /// The sell price.
        /// </value>
        public Price SellPrice { get; set; }

        /// <summary>
        /// Gets or sets the required skill.
        /// </summary>
        /// <value>
        /// The required skill.
        /// </value>
        public int RequiredSkill { get; set; }

        /// <summary>
        /// Gets or sets the required level.
        /// </summary>
        /// <value>
        /// The required level.
        /// </value>
        public int RequiredLevel { get; set; }

        /// <summary>
        /// Gets or sets the required skill rank.
        /// </summary>
        /// <value>
        /// The required skill rank.
        /// </value>
        public int RequiredSkillRank { get; set; }

        /// <summary>
        /// Gets or sets the socket information.
        /// </summary>
        /// <value>
        /// The socket information.
        /// </value>
        public ItemSockets SocketInfo { get; set; }

        /// <summary>
        /// Gets or sets the item source.
        /// </summary>
        /// <value>
        /// The item source.
        /// </value>
        public ItemSource ItemSource { get; set; }

        /// <summary>
        /// Gets or sets the base armor.
        /// </summary>
        /// <value>
        /// The base armor.
        /// </value>
        public int BaseArmor { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance has sockets.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance has sockets; otherwise, <c>false</c>.
        /// </value>
        public bool HasSockets { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is auctionable.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance is auctionable; otherwise, <c>false</c>.
        /// </value>
        public bool IsAuctionable { get; set; }

        /// <summary>
        /// Gets or sets the armor.
        /// </summary>
        /// <value>
        /// The armor.
        /// </value>
        public int Armor { get; set; }

        /// <summary>
        /// Gets or sets the display information identifier.
        /// </summary>
        /// <value>
        /// The display information identifier.
        /// </value>
        public long DisplayInfoId { get; set; } // TODO: add enum if this turns out to actually mean something

        /// <summary>
        /// Gets or sets the name description.
        /// </summary>
        /// <value>
        /// The name description.
        /// </value>
        public string NameDescription { get; set; }

        /// <summary>
        /// Gets or sets the color of the name description.
        /// </summary>
        /// <value>
        /// The color of the name description.
        /// </value>
        public string NameDescriptionColor { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="ItemDetail"/> is upgradable.
        /// </summary>
        /// <value>
        ///   <c>true</c> if upgradable; otherwise, <c>false</c>.
        /// </value>
        public bool Upgradable { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [heroic tooltip].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [heroic tooltip]; otherwise, <c>false</c>.
        /// </value>
        public bool HeroicTooltip { get; set; }

        /// <summary>
        /// Gets or sets the context.
        /// </summary>
        /// <value>
        /// The context.
        /// </value>
        public string Context { get; set; }

        /// <summary>
        /// Gets or sets the bonus lists.
        /// </summary>
        /// <value>
        /// The bonus lists.
        /// </value>
        public List<int> BonusLists { get; set; }

        /// <summary>
        /// Gets or sets the available contexts.
        /// </summary>
        /// <value>
        /// The available contexts.
        /// </value>
        public List<string> AvailableContexts { get; set; }

        /// <summary>
        /// Gets or sets the disenchanting skill rank.
        /// </summary>
        /// <value>
        /// The disenchanting skill rank.
        /// </value>
        public int DisenchantingSkillRank { get; set; }
    }
}
